# -*- coding: utf-8 -*-
import web
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
sys.path.append(os.path.join(os.path.dirname(__file__), '../../'))
import lib


urls = (
        '/', 'Index'
    )

class Index:
    
    def __init__(self):
        self.render = web.template.render('templates/')
    
    def GET(self, name=None):
#         html = lib.Web.load('http://vnexpress.net').get_html()
#         return html
        data = {'title': 'Hello Web.py'}
        return self.render.index(data)
    
    def POST(self, name):
        return "post"
    
if __name__ == '__main__':
    
    app = web.application(urls, globals())
    web.config.debug = True
    
    
    app.run()